/**
 * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package com.vijayan.profile.model;

import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler;
import com.liferay.portal.kernel.util.StringBundler;
import com.liferay.portal.model.impl.BaseModelImpl;

import java.io.Serializable;

import java.lang.reflect.Proxy;

/**
 * @author vijayan
 */
public class HoroscopeClp extends BaseModelImpl<Horoscope> implements Horoscope {
	public HoroscopeClp() {
	}

	public long getPrimaryKey() {
		return _horoscopeId;
	}

	public void setPrimaryKey(long pk) {
		setHoroscopeId(pk);
	}

	public Serializable getPrimaryKeyObj() {
		return new Long(_horoscopeId);
	}

	public long getHoroscopeId() {
		return _horoscopeId;
	}

	public void setHoroscopeId(long horoscopeId) {
		_horoscopeId = horoscopeId;
	}

	public long getProfileId() {
		return _profileId;
	}

	public void setProfileId(long profileId) {
		_profileId = profileId;
	}

	public int getSuryan() {
		return _suryan;
	}

	public void setSuryan(int suryan) {
		_suryan = suryan;
	}

	public int getChandra() {
		return _chandra;
	}

	public void setChandra(int chandra) {
		_chandra = chandra;
	}

	public int getKuja() {
		return _kuja;
	}

	public void setKuja(int kuja) {
		_kuja = kuja;
	}

	public int getBudha() {
		return _budha;
	}

	public void setBudha(int budha) {
		_budha = budha;
	}

	public int getGuru() {
		return _guru;
	}

	public void setGuru(int guru) {
		_guru = guru;
	}

	public int getSukra() {
		return _sukra;
	}

	public void setSukra(int sukra) {
		_sukra = sukra;
	}

	public int getSani() {
		return _sani;
	}

	public void setSani(int sani) {
		_sani = sani;
	}

	public int getRahu() {
		return _rahu;
	}

	public void setRahu(int rahu) {
		_rahu = rahu;
	}

	public int getKetu() {
		return _ketu;
	}

	public void setKetu(int ketu) {
		_ketu = ketu;
	}

	public int getMandhi() {
		return _mandhi;
	}

	public void setMandhi(int mandhi) {
		_mandhi = mandhi;
	}

	public int getLagna() {
		return _lagna;
	}

	public void setLagna(int lagna) {
		_lagna = lagna;
	}

	public Horoscope toEscapedModel() {
		if (isEscapedModel()) {
			return this;
		}
		else {
			return (Horoscope)Proxy.newProxyInstance(Horoscope.class.getClassLoader(),
				new Class[] { Horoscope.class }, new AutoEscapeBeanHandler(this));
		}
	}

	public Object clone() {
		HoroscopeClp clone = new HoroscopeClp();

		clone.setHoroscopeId(getHoroscopeId());
		clone.setProfileId(getProfileId());
		clone.setSuryan(getSuryan());
		clone.setChandra(getChandra());
		clone.setKuja(getKuja());
		clone.setBudha(getBudha());
		clone.setGuru(getGuru());
		clone.setSukra(getSukra());
		clone.setSani(getSani());
		clone.setRahu(getRahu());
		clone.setKetu(getKetu());
		clone.setMandhi(getMandhi());
		clone.setLagna(getLagna());

		return clone;
	}

	public int compareTo(Horoscope horoscope) {
		long pk = horoscope.getPrimaryKey();

		if (getPrimaryKey() < pk) {
			return -1;
		}
		else if (getPrimaryKey() > pk) {
			return 1;
		}
		else {
			return 0;
		}
	}

	public boolean equals(Object obj) {
		if (obj == null) {
			return false;
		}

		HoroscopeClp horoscope = null;

		try {
			horoscope = (HoroscopeClp)obj;
		}
		catch (ClassCastException cce) {
			return false;
		}

		long pk = horoscope.getPrimaryKey();

		if (getPrimaryKey() == pk) {
			return true;
		}
		else {
			return false;
		}
	}

	public int hashCode() {
		return (int)getPrimaryKey();
	}

	public String toString() {
		StringBundler sb = new StringBundler(27);

		sb.append("{horoscopeId=");
		sb.append(getHoroscopeId());
		sb.append(", profileId=");
		sb.append(getProfileId());
		sb.append(", suryan=");
		sb.append(getSuryan());
		sb.append(", chandra=");
		sb.append(getChandra());
		sb.append(", kuja=");
		sb.append(getKuja());
		sb.append(", budha=");
		sb.append(getBudha());
		sb.append(", guru=");
		sb.append(getGuru());
		sb.append(", sukra=");
		sb.append(getSukra());
		sb.append(", sani=");
		sb.append(getSani());
		sb.append(", rahu=");
		sb.append(getRahu());
		sb.append(", ketu=");
		sb.append(getKetu());
		sb.append(", mandhi=");
		sb.append(getMandhi());
		sb.append(", lagna=");
		sb.append(getLagna());
		sb.append("}");

		return sb.toString();
	}

	public String toXmlString() {
		StringBundler sb = new StringBundler(43);

		sb.append("<model><model-name>");
		sb.append("com.vijayan.profile.model.Horoscope");
		sb.append("</model-name>");

		sb.append(
			"<column><column-name>horoscopeId</column-name><column-value><![CDATA[");
		sb.append(getHoroscopeId());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>profileId</column-name><column-value><![CDATA[");
		sb.append(getProfileId());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>suryan</column-name><column-value><![CDATA[");
		sb.append(getSuryan());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>chandra</column-name><column-value><![CDATA[");
		sb.append(getChandra());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>kuja</column-name><column-value><![CDATA[");
		sb.append(getKuja());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>budha</column-name><column-value><![CDATA[");
		sb.append(getBudha());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>guru</column-name><column-value><![CDATA[");
		sb.append(getGuru());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>sukra</column-name><column-value><![CDATA[");
		sb.append(getSukra());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>sani</column-name><column-value><![CDATA[");
		sb.append(getSani());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>rahu</column-name><column-value><![CDATA[");
		sb.append(getRahu());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>ketu</column-name><column-value><![CDATA[");
		sb.append(getKetu());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>mandhi</column-name><column-value><![CDATA[");
		sb.append(getMandhi());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>lagna</column-name><column-value><![CDATA[");
		sb.append(getLagna());
		sb.append("]]></column-value></column>");

		sb.append("</model>");

		return sb.toString();
	}

	private long _horoscopeId;
	private long _profileId;
	private int _suryan;
	private int _chandra;
	private int _kuja;
	private int _budha;
	private int _guru;
	private int _sukra;
	private int _sani;
	private int _rahu;
	private int _ketu;
	private int _mandhi;
	private int _lagna;
}